#include<stdio.h>
#include<sys/types.h>
#include<unistd.h>

int main()
{
  chdir("/home/lp");
  //创建一个文件，并关闭这个文件：
  FILE* pf = fopen("log.txt", "w");
  fclose(pf);

  while(1)
  {
    printf("I am a process, pid:%d\n", getpid());
    sleep(1);
  }
  return 0;
}
